#ifndef ARCHIVE_H_
#define ARCHIVE_H_
//
// C++ Interface: Archive
//
// Description: 
//
//
// Author: Vitali Lovich <vlovich@gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include <QDir>
#include <QString>

#include "ArchivePart.h"

class Archive : public QObject, public QDir
{
	Q_OBJECT
signals:
	void startedExtraction();
	void stoppedExtraction();
	void missingPart(const ArchivePart & path);
	void corruptPart(const ArchivePart & path);
	void extracted(size_t numBytes, long timeSinceLastUpdateMS);

public:
	Archive(QString path);
	virtual ~Archive();

	virtual QString getArchiveType() const = 0;
	virtual QString getPluginName() const = 0;

public slots:
	virtual void extract(QString destDir, bool overwrite) = 0;
	virtual void continueExtraction(QString pathToMissingPart) = 0;
	virtual void foundPart(const ArchivePart & anotherPart) = 0;
	virtual void foundPart(const QString & anotherPart) = 0;

protected:
	QList<ArchivePart> allParts;
};

#endif /* ARCHIVE_H_ */
